﻿using System;

namespace Emerald
{
    public class Piece
    {
        public EColor Color { get; private set; }
        public EState State { get; private set; }

        public Piece(EColor color)
        {
            this.Color = color;
            this.State = EState.Unmarked;
        }

        public EState Flip()
        {
            switch (State)
            {
                case EState.Marked:
                    State = EState.Unmarked;
                    return EState.Marked;
                case EState.Unmarked:
                    State = EState.Marked;
                    return EState.Unmarked;
                default:
                    throw new Exception("Shouldn't get here.");
            }
        }
    }
}


